bors [Thu, 5 Jan 2017 01:22:35 +0000 (01:22 +0000)]
Auto merge of #3468 - nrc:metadata-emit, r=alexcrichton
cargo check: use --emit=metadata rather than --crate-type=metadata
Requires https://github.com/rust-lang/rust/pull/38571 (don't land before that does)
r? @alexcrichton
Nick Cameron [Tue, 3 Jan 2017 21:22:58 +0000 (10:22 +1300)]
Fixup tests
Nick Cameron [Wed, 28 Dec 2016 21:30:34 +0000 (10:30 +1300)]
Use --emit=metadata rather than --crate-type=metadata
Requires https://github.com/rust-lang/rust/pull/38571
bors [Mon, 2 Jan 2017 18:09:26 +0000 (18:09 +0000)]
Auto merge of #3485 - sfackler:useragent, r=alexcrichton
Set a user agent with the version when talking to the registry
This can be used to track what versions of Cargo are being used in the
wild, which can be very useful.
r? @alexcrichton
Steven Fackler [Mon, 2 Jan 2017 03:35:30 +0000 (19:35 -0800)]
Set a user agent with the version when talking to the registry
This can be used to track what versions of Cargo are being used in the
wild, which can be very useful.
bors [Sat, 31 Dec 2016 02:48:35 +0000 (02:48 +0000)]
Auto merge of #3480 - alexcrichton:one-flaky-test, r=brson
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
[1]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.1331/job/xq4ogmglj7sllibw
Alex Crichton [Sat, 31 Dec 2016 02:40:20 +0000 (18:40 -0800)]
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
[1]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.1331/job/xq4ogmglj7sllibw
bors [Fri, 30 Dec 2016 18:54:01 +0000 (18:54 +0000)]
Auto merge of #3477 - sfackler:shell-escape, r=alexcrichton
Use externally sourced shell-escape
Closes #3374
r? @alexcrichton
Steven Fackler [Fri, 30 Dec 2016 18:21:10 +0000 (10:21 -0800)]
Use externally sourced shell-escape
Closes #3374
bors [Thu, 29 Dec 2016 20:38:27 +0000 (20:38 +0000)]
Auto merge of #3470 - alexcrichton:no-more-urls, r=steveklabnik
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
Alex Crichton [Thu, 29 Dec 2016 16:06:38 +0000 (08:06 -0800)]
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
bors [Thu, 29 Dec 2016 08:49:03 +0000 (08:49 +0000)]
Auto merge of #3435 - alexcrichton:bump-libssh2, r=brson
Update libssh2 to fix a segfault on Windows
There's some more discussion on #3401, but this essentially is just an inclusion
of libssh2/libssh2#163
Closes #3401
bors [Thu, 29 Dec 2016 07:37:46 +0000 (07:37 +0000)]
Auto merge of #3417 - alexcrichton:fix-svn, r=brson
Ignore dot dirs in directory sources
Looks like they'll conflict with a VCS, so let's just skip them like we do in
directory traversal elsewhere.
Closes #3414
bors [Thu, 29 Dec 2016 03:34:29 +0000 (03:34 +0000)]
Auto merge of #3412 - alexcrichton:fix-recursion, r=brson
Fix recursion in build_path_deps
We were slightly too eager to follow pointers!
Closes #3330
bors [Thu, 29 Dec 2016 01:47:37 +0000 (01:47 +0000)]
Auto merge of #3467 - alexcrichton:verbose, r=alexcrichton
Attempt to debug a problem on AppVeyor
Let's get verbose logs from this step
Alex Crichton [Thu, 29 Dec 2016 00:57:29 +0000 (16:57 -0800)]
Attempt to debug a problem on AppVeyor
Let's get verbose logs from this step
bors [Wed, 28 Dec 2016 20:39:45 +0000 (20:39 +0000)]
Auto merge of #3438 - petrochenkov:bsdoc, r=alexcrichton
Add some more details to build script docs
r? @alexcrichton
petrochenkov [Wed, 28 Dec 2016 11:50:37 +0000 (14:50 +0300)]
Add some more details to build script docs
bors [Mon, 26 Dec 2016 19:04:45 +0000 (19:04 +0000)]
Auto merge of #3458 - alexcrichton:docs, r=steveklabnik
Update README build instructions
Closes #3437
bors [Mon, 26 Dec 2016 06:48:55 +0000 (06:48 +0000)]
Auto merge of #3454 - alexcrichton:bump1, r=alexcrichton
Bump crates-io to 0.6.0
bors [Mon, 26 Dec 2016 05:20:41 +0000 (05:20 +0000)]
Auto merge of #3439 - gentoo90:bashcomp, r=alexcrichton
Bashcomp
Update bash completion
bors [Mon, 26 Dec 2016 03:52:05 +0000 (03:52 +0000)]
Auto merge of #3426 - nrc:check-fix-2, r=alexcrichton
Test for #3419
Based on top of https://github.com/rust-lang/cargo/pull/3425.
I'm not sure if this is an acceptable test because it downloads rustc-serialize.
r? @alexcrichton
bors [Mon, 26 Dec 2016 02:45:07 +0000 (02:45 +0000)]
Auto merge of #3436 - matklad:abs-target, r=alexcrichton
Make sure targets always use absolute path
Closes #3416
I'd want to add a test for it later. Seems a bit suspicious that this change has not caused any test to fail.
Alex Crichton [Mon, 26 Dec 2016 01:02:04 +0000 (17:02 -0800)]
Update README build instructions
bors [Sun, 25 Dec 2016 23:53:35 +0000 (23:53 +0000)]
Auto merge of #3457 - alexcrichton:no-check-on-beta, r=alexcrichton
Only run check tests on nightly
Alex Crichton [Sun, 25 Dec 2016 22:01:03 +0000 (14:01 -0800)]
Only run check tests on nightly
Alex Crichton [Sun, 25 Dec 2016 16:00:37 +0000 (08:00 -0800)]
Bump crates-io to 0.6.0
Nick Cameron [Sun, 18 Dec 2016 21:52:50 +0000 (10:52 +1300)]
Test for cargo check with macro and both lib and bin.
Closes #3419
Nick Cameron [Sat, 17 Dec 2016 20:23:33 +0000 (10:23 -1000)]
Add a test
Includes adding facility for checking that output does not contain a string.
gentoo90 [Wed, 21 Dec 2016 19:12:16 +0000 (21:12 +0200)]
Update bash completion
gentoo90 [Wed, 21 Dec 2016 19:11:02 +0000 (21:11 +0200)]
Unify indentation in bash completion
Aleksey Kladov [Wed, 21 Dec 2016 06:22:00 +0000 (09:22 +0300)]
Make sure targets always use absolute path
Alex Crichton [Tue, 20 Dec 2016 22:40:11 +0000 (14:40 -0800)]
Update libssh2 to fix a segfault on Windows
There's some more discussion on #3401, but this essentially is just an inclusion
of libssh2/libssh2#163
Closes #3401
Alex Crichton [Fri, 16 Dec 2016 20:54:47 +0000 (12:54 -0800)]
Ignore dot dirs in directory sources
Looks like they'll conflict with a VCS, so let's just skip them like we do in
directory traversal elsewhere.
Closes #3414
bors [Tue, 20 Dec 2016 00:32:58 +0000 (00:32 +0000)]
Auto merge of #3430 - alexcrichton:bump, r=brson
Bump to 0.17.0
Alex Crichton [Tue, 20 Dec 2016 00:28:47 +0000 (16:28 -0800)]
Bump to 0.17.0
bors [Mon, 19 Dec 2016 19:54:03 +0000 (19:54 +0000)]
Auto merge of #3424 - matklad:naming-things, r=alexcrichton
Minor, more explicit names
Ultraminor renaming. Have to look at this tests because it fails if you link with older libgit.
bors [Mon, 19 Dec 2016 18:19:00 +0000 (18:19 +0000)]
Auto merge of #3413 - matklad:ref, r=alexcrichton
Refactor resolve_dependencies
This moves `resolve_dependencies` function from `compile.rs` into the `resolve.rs`, where it more reasonably belongs.
bors [Mon, 19 Dec 2016 17:04:04 +0000 (17:04 +0000)]
Auto merge of #3410 - fmdkdd:fix-3390-message-format-parse-stderr, r=alexcrichton
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
Fixes #3390.
Nick Cameron [Sat, 17 Dec 2016 19:08:14 +0000 (09:08 -1000)]
make sure we use the check profile where possible for lib deps.
Fixes #3418
Aleksey Kladov [Sun, 18 Dec 2016 16:21:13 +0000 (19:21 +0300)]
Minor, more explicit names
Aleksey Kladov [Sun, 18 Dec 2016 15:42:05 +0000 (18:42 +0300)]
Don't carry source ids along with sources
Aleksey Kladov [Sat, 17 Dec 2016 09:37:38 +0000 (12:37 +0300)]
Be more explicit about temporary workspaces
Aleksey Kladov [Sat, 17 Dec 2016 09:07:37 +0000 (12:07 +0300)]
Add source_id method to the Source
Alex Crichton [Mon, 28 Nov 2016 19:10:31 +0000 (11:10 -0800)]
Fix recursion in build_path_deps
We were slightly too eager to follow pointers!
Closes #3330
fmdkdd [Fri, 16 Dec 2016 13:16:37 +0000 (14:16 +0100)]
Add a test for `--message-format` parsing the mixed output of rustc
Aleksey Kladov [Fri, 16 Dec 2016 08:17:02 +0000 (11:17 +0300)]
Rename resolve_dependencies -> resolve_ws_precisely
Aleksey Kladov [Fri, 16 Dec 2016 08:13:07 +0000 (11:13 +0300)]
Simplify `resolve_ws` API
Aleksey Kladov [Fri, 16 Dec 2016 08:01:01 +0000 (11:01 +0300)]
Move `resolve_dependencies` into resolve.rs
bors [Fri, 16 Dec 2016 00:28:35 +0000 (00:28 +0000)]
Auto merge of #3411 - alexcrichton:tweaks, r=alexcrichton
Minor build tweaks
* Clean out OpenSSL when building
* Test 32-bit Cargo on OSX, not the 64-bit version on the 32-bit builder
Alex Crichton [Thu, 15 Dec 2016 16:59:51 +0000 (08:59 -0800)]
Minor build tweaks
* Clean out OpenSSL when building
* Test 32-bit Cargo on OSX, not the 64-bit version on the 32-bit builder
fmdkdd [Thu, 15 Dec 2016 23:05:58 +0000 (00:05 +0100)]
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
Fixes #3390.
bors [Thu, 15 Dec 2016 19:04:28 +0000 (19:04 +0000)]
Auto merge of #3409 - matklad:workspace-manifest-error, r=alexcrichton
Don't ignore errors in workspace manifest
Closes #3407
If we find `Cargo.toml` during an up tree traversal, we'd better not to ignore errors within it!
Aleksey Kladov [Thu, 15 Dec 2016 17:27:48 +0000 (20:27 +0300)]
Don't ignore errors in workspace manifest
bors [Thu, 15 Dec 2016 03:04:20 +0000 (03:04 +0000)]
Auto merge of #3393 - alexcrichton:fix-libz-linkage, r=brson
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Closes #3384
bors [Thu, 15 Dec 2016 01:28:15 +0000 (01:28 +0000)]
Auto merge of #3403 - matklad:doc-loc, r=alexcrichton
cargo doc: show where are docs
Let's print the file we are trying to open. It's useful when we fail to detect the browser, because the user would be able to copy-paste url manually.
Alex Crichton [Tue, 13 Dec 2016 08:22:00 +0000 (00:22 -0800)]
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Also update curl-sys to fix a build issue on MinGW.
Closes #3384
bors [Wed, 14 Dec 2016 23:09:13 +0000 (23:09 +0000)]
Auto merge of #3402 - matklad:packages, r=alexcrichton
Refactor packages specification
A small refactoring to avoid returning a triple.
Aleksey Kladov [Wed, 14 Dec 2016 22:41:31 +0000 (01:41 +0300)]
cargo doc: show where are docs
Aleksey Kladov [Wed, 14 Dec 2016 22:12:21 +0000 (01:12 +0300)]
Refactor packages specification
bors [Wed, 14 Dec 2016 08:52:55 +0000 (08:52 +0000)]
Auto merge of #3396 - pornel:test, r=alexcrichton
Test for issue #2064
I've tried to reproduce the problem from #2064, but to my surprise the test passes reliably :)
bors [Wed, 14 Dec 2016 07:44:02 +0000 (07:44 +0000)]
Auto merge of #3296 - nrc:check, r=alexcrichton
cargo check
~~This is not finished - the big omission is no tests, and it needs some more testing too. It also requires https://github.com/rust-lang/rust/pull/37681.~~
However, this is my first non-trivial Cargo patch, so I'd like to get some early feedback.
r? @alexcrichton
and cc @rust-lang/tools since this adds a new Cargo sub-command (although we have previously discussed and approved the idea in a tools meeting).
bors [Wed, 14 Dec 2016 05:56:37 +0000 (05:56 +0000)]
Auto merge of #3398 - alexcrichton:git-rev, r=alexcrichton
Fix git rev showing up in version number
Makefiles didn't support an out-of-tree build, so needed to update them to do
so.
bors [Wed, 14 Dec 2016 03:38:52 +0000 (03:38 +0000)]
Auto merge of #3363 - alexcrichton:libcmt, r=alexcrichton
Compile statically against the MSVC CRT
This updates our AppVeyor builds to compile with `-Ctarget-feature=+crt-static`
to help Cargo be a bit more portable and not rely on the MSVC redistributable
artifacts. Over time this may even let us converge on only releasing one build
of Cargo and just pairing that with all Windows toolchains...
bors [Wed, 14 Dec 2016 02:30:46 +0000 (02:30 +0000)]
Auto merge of #3399 - alexcrichton:fix-nightly, r=alexcrichton
Fix compatibility with Rust nightly
These two tests actually shouldn't have ever passed, but nightly Rust is more
principled about "$OUT_DIR" and doesn't leak it where possible, so these two
tests were accidentally compiling due to leaking '$OUT_DIR' for Cargo itself.
bors [Wed, 14 Dec 2016 01:19:37 +0000 (01:19 +0000)]
Auto merge of #3386 - matklad:warn-replace, r=alexcrichton
Warn if replace is not actually used
closes #3324
I've added warnings to `resolve_dependencies` inside `cargo_compile.rs`. Adding them to `resolve_with_previous` does not work because that method is called several times.
Perhaps the best idea is to refactor resolve facade, such that we have only `ops::resolve` and not `ops::resolve_ws`, `ops::resolve_with_previous` and `ops::resolve_dependencies`. IIRC, there were some bugs because of logic mismatch between `compile` and `metadata` commands.
Alex Crichton [Wed, 14 Dec 2016 01:18:32 +0000 (17:18 -0800)]
Fix compatibility with Rust nightly
These two tests actually shouldn't have ever passed, but nightly Rust is more
principled about "$OUT_DIR" and doesn't leak it where possible, so these two
tests were accidentally compiling due to leaking '$OUT_DIR' for Cargo itself.
Alex Crichton [Wed, 14 Dec 2016 00:36:31 +0000 (16:36 -0800)]
Fix git rev showing up in version number
Makefiles didn't support an out-of-tree build, so needed to update them to do
so.
bors [Tue, 13 Dec 2016 23:19:55 +0000 (23:19 +0000)]
Auto merge of #3385 - matklad:package-test, r=alexcrichton
Add test for --package and virtual manifest
closes #3194
The issue was actually fixed by #3221 (thanks @euclio !), so let's just add a test (a copy of `virtual_works` basically).
bors [Tue, 13 Dec 2016 21:46:34 +0000 (21:46 +0000)]
Auto merge of #3371 - trafficland:master, r=alexcrichton
Add -vv to the list of options printed by cargo --help.
Alex Crichton [Fri, 2 Dec 2016 22:34:18 +0000 (14:34 -0800)]
Compile statically against the MSVC CRT
This updates our AppVeyor builds to compile with `-Ctarget-feature=+crt-static`
to help Cargo be a bit more portable and not rely on the MSVC redistributable
artifacts. Over time this may even let us converge on only releasing one build
of Cargo and just pairing that with all Windows toolchains...
Kornel Lesiński [Tue, 13 Dec 2016 21:00:15 +0000 (21:00 +0000)]
Test for issue #2064
bors [Tue, 13 Dec 2016 18:55:46 +0000 (18:55 +0000)]
Auto merge of #3395 - alexcrichton:fix-appveyor, r=alexcrichton
Pin to an older version of rustup temporarily
cc #3394
Alex Crichton [Tue, 13 Dec 2016 18:49:45 +0000 (10:49 -0800)]
Pin to an older version of rustup temporarily
cc #3394
Nick Cameron [Tue, 13 Dec 2016 06:33:05 +0000 (20:33 -1000)]
Fix some rebasing errors
bors [Mon, 12 Dec 2016 19:24:38 +0000 (19:24 +0000)]
Auto merge of #3392 - matklad:patch-1, r=steveklabnik
Add explanatory comment to header.html
See #3387
Aleksey Kladov [Mon, 12 Dec 2016 18:28:25 +0000 (21:28 +0300)]
Add explanatory comment to header.html
See #3387
Aleksey Kladov [Mon, 12 Dec 2016 14:33:12 +0000 (17:33 +0300)]
Warn if replace is not actually used
closes #3324
Aleksey Kladov [Mon, 12 Dec 2016 12:57:19 +0000 (15:57 +0300)]
Add test for --package and virtual manifest
closes #3194
Eric D. Reichert [Mon, 5 Dec 2016 14:09:41 +0000 (09:09 -0500)]
Added -vv to the list of options printed by cargo and its sub commands.
Nick Cameron [Thu, 1 Dec 2016 22:25:55 +0000 (11:25 +1300)]
Be a bit more careful not to crash if the compiler doesn't support --crate-type metadata
Nick Cameron [Tue, 29 Nov 2016 03:10:00 +0000 (16:10 +1300)]
tests
Nick Cameron [Wed, 16 Nov 2016 01:46:24 +0000 (14:46 +1300)]
cargo check
Adds a new mode - check - which only checks code, rather than generating machine code. It takes into account that proc macros and build scripts will still require generated code.
Implemented by adding a check profile and setting this on each Unit, unless the unit is required to be built (i.e., is a proc macro, build script, or dep of one).
bors [Thu, 8 Dec 2016 23:55:15 +0000 (23:55 +0000)]
Auto merge of #3221 - euclio:test-all, r=alexcrichton
Add `--all` flag to `cargo test`
Work towards #2878.
This flag allows a user to test all members of a workspace by using `cargo test --all`. The command is also supported when using a virtual workspace manifest.
Andy Russell [Thu, 8 Dec 2016 22:32:33 +0000 (17:32 -0500)]
replace `current_opt` with membership check
Andy Russell [Fri, 2 Dec 2016 21:03:42 +0000 (16:03 -0500)]
fix formatting issues
Andy Russell [Fri, 2 Dec 2016 20:28:40 +0000 (15:28 -0500)]
remove unused argument to `Context::lib_profile`
Andy Russell [Fri, 2 Dec 2016 20:21:31 +0000 (15:21 -0500)]
remove unnecessary usage of `current_opt`
Andy Russell [Fri, 2 Dec 2016 19:40:37 +0000 (14:40 -0500)]
avoid round-tripping through string
Andy Russell [Fri, 2 Dec 2016 19:30:16 +0000 (14:30 -0500)]
remove unnecessary match
Andy Russell [Wed, 16 Nov 2016 21:04:31 +0000 (16:04 -0500)]
show warnings for all members of the workspace
Andy Russell [Wed, 16 Nov 2016 20:26:18 +0000 (15:26 -0500)]
pass `Packages` into resolve dependencies
Andy Russell [Wed, 16 Nov 2016 19:31:06 +0000 (14:31 -0500)]
remove current_package from context
Andy Russell [Thu, 20 Oct 2016 20:14:54 +0000 (16:14 -0400)]
add `--all` flag to `cargo-test`
Andy Russell [Fri, 21 Oct 2016 03:57:51 +0000 (23:57 -0400)]
avoid panic when virtual workspace has no members
bors [Wed, 7 Dec 2016 08:11:16 +0000 (08:11 +0000)]
Auto merge of #3361 - pwoolcoc:default-build-script, r=alexcrichton
Assume `build.rs` in the same directory as `Cargo.toml` is a build script (unless explicitly told not to)
So, in May I posted a question in the #cargo IRC room: https://botbot.me/mozilla/cargo/2016-05-26/?msg=
66770068&page=1
This PR does what was discussed there. If `cargo` sees a `build.rs` in the same directory as the `Cargo.toml`, it will assume `build.rs` is a build script unless `package.build = false`. Just for completeness I also made `build = true` mean the same as `build = "build.rs"` but I'm not sure if that is okay or not.
Paul Woolcock [Tue, 6 Dec 2016 15:07:52 +0000 (10:07 -0500)]
change this to only emit a warning right now
bors [Tue, 6 Dec 2016 06:59:46 +0000 (06:59 +0000)]
Auto merge of #3372 - alexcrichton:sha256, r=alexcrichton
Upload sha256 sums of cargo artifacts
Alex Crichton [Tue, 6 Dec 2016 06:54:11 +0000 (22:54 -0800)]
Upload sha256 sums of cargo artifacts
bors [Tue, 6 Dec 2016 01:23:17 +0000 (01:23 +0000)]
Auto merge of #3319 - alexcrichton:more-info, r=brson
Emit more info on --message-format=json
This adds more output on Cargo's behalf to the output of
`--message-format=json`. Cargo will now emit a message when a crate is finished
compiling with a list of all files that were just generated along with a message
when a build script finishes executing with linked libraries and linked library
paths.
Closes #3212